package com.henghe.frame.auth.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.henghe.frame.common.entity.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

/**
 * Description:
 * Author: LiuWenQing
 * Datetime: 2024/6/6 15:09
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@TableName("sys_user")
@ApiModel("用户表")
public class SysUser extends BaseEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.ASSIGN_ID)
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    @ApiModelProperty("用户编号")
    private String userNo;
    @ApiModelProperty("姓名")
    private String realName;

    @ApiModelProperty("账号")
    private String userName;

    @ApiModelProperty("密码")
    private String password;

    @ApiModelProperty("三方登录密码")
    private String outPassword;

    private String qybm;

    @ApiModelProperty("用户类型")
    private Integer userType;

    @JsonSerialize(using = ToStringSerializer.class)
    private Integer deptId;

    @ApiModelProperty("照片")
    private String photoSrc;

    @ApiModelProperty("手机号")
    private String phoneNo;

    @ApiModelProperty("身份证号")
    private String userIdentity;

    private Integer userSex;

    @ApiModelProperty("邮箱")
    private String email;

    private Integer useStatus;

    private Integer loginCnt;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date lastLoginTime;


}
